package com.springboot.cloud.demos.producer.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.springboot.cloud.demos.entity.po.MomentSupport;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
@Mapper
public interface MomentSupportMapper extends BaseMapper<MomentSupport> {

    @Select("SELECT c.id ,c.mobile,c.username,c.nickname,c.sex,c.real_man as realMan, " +
            "c.pretty ,c.avatar,c.description,c.vip_status as vipStatus from  t_user c   " +
            "left join  t_moment_support a on a.user_id=c.id " +
            " where a.type=1 and a.moment_id = ${momentId}")
    List<Map<String, Object>> getSignUpList(@Param("momentId") String momentId);
}
